package javaobjectsandencapsulation.no6;

public class Dog {
    private String type;
    private String name;
    private int weight;

    public Dog(String name, String type, int weight) {
        this.type = type;
        this.name = name;
        this.weight = weight;
    }

    public Dog(String name, String type) {
        this.type = type;
        this.name = name;
    }

    public void print() {
        System.out.println(String.format("我叫%s,品种:%s,重量:%S/kg",name,type,weight));
    }

    public String getType() {
        return type;
    }

    public String getName() {
        return name;
    }

    public int getWeight() {
        return weight;
    }
}
